@import "constant";

// eg. l15 = margin-left: 15
@each $property, $direction in (ml, l),
  (mr, r),
  (mt, t),
  (mb, b) {
  @for $i from 1 through 20 {
    @if($i <= length($edge-list)){
      .#{$property}#{$i - 1} {
        @include margin($direction, nth($edge-list, $i));
      }
    } @else{
      .#{$property}#{$i} {
        @include margin($direction, $i)
      }
    }
  }
}

// eg. l15 = margin-left: 15
@each $property, $direction in (pl, l),
  (pr, r),
  (pt, t),
  (pb, b) {
  @for $i from 1 through 20 {
    @if($i <= length($edge-list)){
      .#{$property}#{$i - 1} {
        @include padding($direction, nth($edge-list, $i))
      }
    } @else{
      .#{$property}#{$i} {
        @include padding($direction, $i)
      }
    }
  }
}
